Integrand size = 19, antiderivative size = 35 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=2 a b x-\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}-\frac {b^2 \cos (e+f x)}{f} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2825, 2814, 3855} \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}+2 a b x-\frac {b^2 \cos (e+f x)}{f} \]
[In]
[Out]
Rule 2814
Rule 2825
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\frac {b^2 \cos (e+f x)}{f}+\int \csc (e+f x) \left (a^2+2 a b \sin (e+f x)\right ) \, dx \\ & = 2 a b x-\frac {b^2 \cos (e+f x)}{f}+a^2 \int \csc (e+f x) \, dx \\ & = 2 a b x-\frac {a^2 \text {arctanh}(\cos (e+f x))}{f}-\frac {b^2 \cos (e+f x)}{f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(76\) vs. \(2(35)=70\).
Time = 0.06 (sec) , antiderivative size = 76, normalized size of antiderivative = 2.17 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=2 a b x-\frac {b^2 \cos (e) \cos (f x)}{f}-\frac {a^2 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{f}+\frac {a^2 \log \left (\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{f}+\frac {b^2 \sin (e) \sin (f x)}{f} \]
[In]
[Out]
Time = 0.70 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.14
method | result | size |
parallelrisch | \(\frac {2 a b x f +b^{2}+a^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\cos \left (f x +e \right ) b^{2}}{f}\) | \(40\) |
derivativedivides | \(\frac {a^{2} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+2 a b \left (f x +e \right )-\cos \left (f x +e \right ) b^{2}}{f}\) | \(46\) |
default | \(\frac {a^{2} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+2 a b \left (f x +e \right )-\cos \left (f x +e \right ) b^{2}}{f}\) | \(46\) |
risch | \(2 a b x -\frac {b^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 f}-\frac {b^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 f}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}\) | \(80\) |
norman | \(\frac {\frac {2 b^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+2 a b x +\frac {2 b^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+4 a b x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+2 a b x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {a^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(111\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {4 \, a b f x - 2 \, b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + a^{2} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, f} \]
[In]
[Out]
\[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc {\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.26 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {2 \, {\left (f x + e\right )} a b - b^{2} \cos \left (f x + e\right ) - a^{2} \log \left (\cot \left (f x + e\right ) + \csc \left (f x + e\right )\right )}{f} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.40 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {2 \, {\left (f x + e\right )} a b + a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) - \frac {2 \, b^{2}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1}}{f} \]
[In]
[Out]
Time = 6.78 (sec) , antiderivative size = 125, normalized size of antiderivative = 3.57 \[ \int \csc (e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f}-\frac {2\,b^2}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {4\,a\,b\,\mathrm {atan}\left (\frac {16\,a^2\,b^2}{8\,a^3\,b-16\,a^2\,b^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}+\frac {8\,a^3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8\,a^3\,b-16\,a^2\,b^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f} \]
[In]
[Out]